-
Notifications
You must be signed in to change notification settings - Fork 3.4k
feat: add a tooltip for each api docs link #12600
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @schultek, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the user experience on the site by implementing interactive tooltips for Flutter API documentation links. Instead of requiring users to navigate to a new page, these tooltips provide a concise preview of the API entry directly on hover, focus, or tap, streamlining the information discovery process. The implementation includes new styling, a client-side component for fetching and rendering the tooltip content, and a page extension to automatically apply this functionality to relevant links. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a great new feature, adding dynamic tooltips to API documentation links. The implementation is well-structured, using a client-side Jaspr component and a content processor to automatically enhance the links. The SCSS is clean and the component correctly handles different interaction models for touch and non-touch devices. However, I've identified a few critical issues in the client-side Dart code that could lead to runtime errors and crash the script. I've also found a high-severity usability issue on touch devices that prevents link navigation. My review includes specific code suggestions to address these points and make the feature more robust and user-friendly.
|
Visit the preview URL for this PR (updated for commit 140503b): https://flutter-docs-prod--pr12600-feat-api-tooltip-0vjb2n7x.web.app |
|
Exciting! I haven't reviewed the code yet, but is there some common popover/tooltip component we can extract out that this, glossary terms, and whatever else can share? |
|
Yes, but I would do it when we actually have a second use-case for this. But I tried to keep this and the glossary cards in site-www already pretty similar. |
a3cad95 to
49598a3
Compare
|
@schultek When you get a chance can you rebase this on |
9759160 to
7368fc7
Compare
|
@parlough Done |
|
Overall looks great to me, but won't we need to update the CORS configuration on api.flutter.dev for this to work? How did you test this? |
Oh yes good that you caught this, I fully forget to raise this. |
This adds a dynamic tooltip to each link pointing to the flutter api docs. The tooltip shows a short preview of the docs on hover (or focus, or tap on mobile).